#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <iostream>
#include <QtGui/QMainWindow>
#include <QListWidgetItem>
#include <QtGui/QApplication>


#include "labdialog.h"
#include "maze.h"
#include "nodegraphics.h"
#include "staralgorithm.h"

#define ROWCOUNT 40
#define COLCOUNT 40


namespace Ui
{
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QApplication *a,QWidget *parent = 0);
    ~MainWindow();
    void Paint();
    QString loadStyleSheet(const QString &sheetName);

private:
    std::vector<NodeGraphics *> itemVector;
    Ui::MainWindow *ui;
    Maze M;
    StarAlgorithm *A;
    labDialog *lDialog;
    QApplication *app;
    void updateLists();

protected:
    void closeEvent ( QCloseEvent * event );


public slots:
    void repaint(int row, int col,ACTION a);
    void start();
    void reset();
    void openFile();
    void saveFile();
    void printParcOpenSlot( int currentRow );
    void printParcCloseSlot( int currentRow );
    void itemClickedOpen( QListWidgetItem * item );
    void pesoAutoSlot(int state);
};

#endif // MAINWINDOW_H
